﻿#region Using namespaces

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

#endregion

namespace BOL.Apps.GeneNetworkBrowser.Controls
{
    public partial class HumanChromosomeFilter : GroupBox
    {
        public HumanChromosomeTypes HumanChromosomeTypes
        {
            get
            {
                HumanChromosomeTypes humanChromosomeTypes = HumanChromosomeTypes.None;

                if (_cbChrAll.IsChecked.Value)
                {
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr1;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr2;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr3;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr4;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr5;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr6;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr7;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr8;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr9;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr10;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr11;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr12;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr13;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr14;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr15;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr16;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr17;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr18;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr19;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr20;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr21;
                    humanChromosomeTypes |= HumanChromosomeTypes.Chr22;
                    humanChromosomeTypes |= HumanChromosomeTypes.ChrX;
                    humanChromosomeTypes |= HumanChromosomeTypes.ChrY;
                }
                else
                {
                    if (_cbChr1.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr1;
                    if (_cbChr2.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr2;
                    if (_cbChr3.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr3;
                    if (_cbChr4.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr4;
                    if (_cbChr5.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr5;
                    if (_cbChr6.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr6;
                    if (_cbChr7.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr7;
                    if (_cbChr8.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr8;
                    if (_cbChr9.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr9;
                    if (_cbChr10.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr10;
                    if (_cbChr11.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr11;
                    if (_cbChr12.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr12;
                    if (_cbChr13.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr13;
                    if (_cbChr14.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr14;
                    if (_cbChr15.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr15;
                    if (_cbChr16.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr16;
                    if (_cbChr17.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr17;
                    if (_cbChr18.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr18;
                    if (_cbChr19.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr19;
                    if (_cbChr20.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr20;
                    if (_cbChr21.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr21;
                    if (_cbChr22.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.Chr22;
                    if (_cbChrX.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.ChrX;
                    if (_cbChrY.IsChecked.Value)
                        humanChromosomeTypes |= HumanChromosomeTypes.ChrY;
                }

                return humanChromosomeTypes;
            }
        }

        public HumanChromosomeFilter()
        {
            InitializeComponent();
        }
    }
}
